home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / DJTST111.ZIP / tests / t05.c < prev    next >
C/C++ Source or Header  |  1993-06-25  |  345b  |  17 lines

  1. #include <graphics.h>
  2.  
  3. main()
  4. {
  5.   int c, i, mx, my;
  6.   char buf[100];
  7.   GrSetMode(GR_default_graphics);
  8.   c = GrAllocColor(255, 255, 0);
  9.   mx = GrSizeX()/2;
  10.   my = GrSizeY()/2;
  11.   GrLine(0, 0, mx, my, c);
  12.   sprintf(buf, "(%d,%d)", mx, my);
  13.   GrTextXY(mx, my, buf, GrWhite(), GrBlack());
  14.   getkey();
  15.   GrSetMode(GR_default_text);
  16. }
  17.